<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father {
            width: 200px;
            height: 10px;
            border: red solid 1px;
            border-radius: 8px;
        }

        .son {
            width: 50px;
            height: 8px;
            border-radius: 8px;
            background-color: rgb(255, 0, 0);
            margin: 1px;
            transition: all 2s ease 0.3s;
        }

        .son:hover {
            width: 190px;
            height: 8px;
            background-color: rgb(248, 0, 0);
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son"></div>
    </div>
</body>

</html>